#ifndef FILETERRAINRESCALEMODULE
#define FILETERRAINRESCALEMODULE

#include <modules\dataModule.h>
#include <surface\pointsBin.h>
#include <base\vec2i.h>
#include <base\vec3f.h>
#include <base\global.h>

#include <string>

using namespace std;

class model;

class fileTerrainRescaleModule : public dataModule {

  vec2i tile_res;
  vec2i from;
  vec2i to;
  vec2i levels_interval;
  int level0_offset;
  int start_level;

  // row, col, pointbin
  map<int, map<int, pointsBin *> >           pbins;
  map<int, map<int, pointsBin *> >::iterator iri_iter;
  map<int, pointsBin *>::iterator            iir_iter;

public:

  fileTerrainRescaleModule(vec2i _tile_res,
                           vec2i _from,
                           vec2i _to,
                           vec2i _levels_interval, 
                           int _level0_offset, 
                           int _start_level);

  virtual bool post(model * _model);
};

#endif